{%include file="m.index.header.tpl.php"%}<!--头部 end-->
<!--主体部分-->
<div class="container" style="margin-top:70px;margin-left:2%;margin-right:2%">
    <div class="row">
        <div class="wrapper">

            <!-- Content Wrapper. Contains page content -->
            <div class="content-wrapper">

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-md-3"> <a href="index.php?a=mail.add" class="btn btn-primary btn-block margin-bottom">写邮件</a>
                            <div class="box box-solid">
                                <div class="box-header with-border">
                                    <h3 class="box-title">文件夹</h3>
                                    <div class="box-tools">
                                        <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> </button>
                                    </div>
                                </div>
                                <div class="box-body no-padding">
                                    <ul class="nav nav-pills nav-stacked">
                                        <li class="active"><a href="index.php?a=mail.list&type=inbox"><i class="fa fa-inbox"></i> 收件箱 <span class="label label-primary pull-right">{%$count%}</span></a></li>
                                        <li><a href="index.php?a=mail.list&type=outbox"><i class="fa fa-envelope-o"></i> 发件箱</a></li>
                                        <!--  <li><a href="#"><i class="fa fa-file-text-o"></i> 草稿</a></li>-->

                                        <li><a href="index.php?a=mail.list&type=spambox"><i class="fa fa-trash-o"></i> 垃圾箱</a></li>
                                    </ul>
                                </div>
                                <!-- /.box-body -->
                            </div>
                            <!-- /. box -->

                        </div>
                        <!-- /.col -->
                        <div class="col-md-9">
                            <div class="box box-primary">
                                <div class="box-header with-border">
                                    <h3 class="box-title">{%$type_name%} ( {%$count%} 封邮件)</h3>
                                    <div class="box-tools pull-right">
                                        <div class="has-feedback">
                                            <form name="sfrom" method="get" action="">
                                                <input type="text" name="s" class="form-control input-sm" placeholder="搜 索">
                                                <input type="hidden" name="a" value="mail.list">
                                                <button type="submit" style="display:none"></button>
                                            <span class="glyphicon glyphicon-search form-control-feedback"></span>
                                            </form></div>
                                    </div>
                                    <!-- /.box-tools -->
                                </div>
                                <!-- /.box-header -->
                                <div class="box-body no-padding">
                                    <!--<div class="mailbox-controls">

                                  <button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i>
                                  </button>
                                  <div class="btn-group">
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-trash-o"></i></button>
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-reply"></i></button>
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-share"></i></button>
                                  </div>

                                  <button type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh"></i></button>
                                          <div class="pull-right">
                                            1-50/200
                                            <div class="btn-group">
                                              <button type="button" class="btn btn-default btn-sm"><i class="fa fa-chevron-left"></i></button>
                                              <button type="button" class="btn btn-default btn-sm"><i class="fa fa-chevron-right"></i></button>
                                            </div>

                                          </div>

                                </div>-->
                                    {%if $type=="spambox"%}
                                    <form name="form2" action="index.php?a=mail.destoryall" method="post">
                                        {%else%}
                                        <form name="form2" action="index.php?a=mail.delall" method="post">
                                            {%/if%}
                                    <div class="table-responsive mailbox-messages">
                                        <table class="table table-hover table-striped">
                                            <thead>
                                            <tr class="text-center">
                                                <td>选择</td>
                                                {%if $type=="outbox"%}
                                                <td>收件人</td>
                                                {%else%}
                                                <td>发件人</td>
                                                {%/if%}
                                                <td>标题</td>
                                                <td>时间</td>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            {%foreach from=$email_lists key=key item=value%}
                                            <tr class="text-center">
                                                <td><input type="checkbox" name="pids[]" value="{%$value.mail_id%}"></td>
                                                <td class="mailbox-name">{%$value.show_name%}</td>
                                                <td class="mailbox-subject">
                                                    {%if $value.is_read=='0'%}
                                                    <a href="index.php?a=mail.info&mail_id={%$value.mail_id%}"><b>{%$value.mail_title%}</b></a>
                                                    {%else%}
                                                    <a href="index.php?a=mail.info&mail_id={%$value.mail_id%}">{%$value.mail_title%}</a>
                                                    {%/if%}
                                                </td>
                                                <td class="mailbox-date">{%$value.create_time%}</td>
                                            </tr>
                                            {%/foreach%}
                                            </tfoot>

                                            <!--<tr>
                                          <td><input type="checkbox"></td>
                                          <td class="mailbox-star"><a href="#"><i class="fa fa-star text-yellow"></i></a></td>
                                          <td class="mailbox-name"><a href="read-mail.html">Alexander Pierce</a></td>
                                          <td class="mailbox-subject"><b>AdminLTE 2.0 Issue</b> - Trying to find a solution to this problem...
                                          </td>
                                          <td class="mailbox-attachment"><i class="fa fa-paperclip"></i></td>
                                          <td class="mailbox-date">15 days ago</td>
                                        </tr>-->

                                        </table>
                                        <!-- /.table -->
                                    </div>
                                            </form>
                                    <!-- /.mail-box-messages -->
                                </div>
                                <!-- /.box-body -->
                                <div class="box-footer no-padding">
                                    <!-- <div class="mailbox-controls">

                                  <button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i>
                                  </button>
                                  <div class="btn-group">
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-trash-o"></i></button>
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-reply"></i></button>
                                    <button type="button" class="btn btn-default btn-sm"><i class="fa fa-share"></i></button>
                                  </div>

                                  <button type="button" class="btn btn-default btn-sm"><i class="fa fa-refresh"></i></button>
                                      <div class="pull-right">
                                        1-50/200
                                        <div class="btn-group">
                                          <button type="button" class="btn btn-default btn-sm"><i class="fa fa-chevron-left"></i></button>
                                          <button type="button" class="btn btn-default btn-sm"><i class="fa fa-chevron-right"></i></button>
                                        </div>

                                      </div>

                                </div>-->
                                </div>
                            </div>
                            <!-- /. box -->
                        </div>
                        <!-- /.col -->
                    </div>
                    <!-- /.row -->
                </section>
                <!-- /.content -->
            </div>
            <!-- /.content-wrapper -->

        </div>
        <!-- ./wrapper -->

    </div>
    <!--row  end-->
</div>
<!--container  end-->
<!--主体部分  end-->
<!--底部-->
{%include file="m.index.footer.tpl.php"%}
<!--container  end-->

<!--底部end-->

<script src="mstatic/js/jQuery-2.2.0.min.js" type="text/javascript"></script>
<!-- Bootstrap 3.3.6 -->
<script src="mstatic/js/bootstrap.min.js" type="text/javascript"></script>
<script src="mstatic/js/app.js" type="text/javascript"></script>
<!-- iCheck -->
<script src="mstatic/js/icheck.min.js" type="text/javascript"></script>
<!-- Page Script -->
<script>
    $(function () {
        //Enable iCheck plugin for checkboxes
        //iCheck for checkbox and radio inputs
        $('.mailbox-messages input[type="checkbox"]').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
            radioClass: 'iradio_flat-blue'
        });

        //Enable check and uncheck all functionality
        $(".checkbox-toggle").click(function () {
            var clicks = $(this).data('clicks');
            if (clicks) {
                //Uncheck all checkboxes
                $(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
                $(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
            } else {
                //Check all checkboxes
                $(".mailbox-messages input[type='checkbox']").iCheck("check");
                $(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
            }
            $(this).data("clicks", !clicks);
        });

        //Handle starring for glyphicon and font awesome
        $(".mailbox-star").click(function (e) {
            e.preventDefault();
            //detect type
            var $this = $(this).find("a > i");
            var glyph = $this.hasClass("glyphicon");
            var fa = $this.hasClass("fa");

            //Switch states
            if (glyph) {
                $this.toggleClass("glyphicon-star");
                $this.toggleClass("glyphicon-star-empty");
            }

            if (fa) {
                $this.toggleClass("fa-star");
                $this.toggleClass("fa-star-o");
            }
        });
    });
</script>
<script src="mstatic/js/icheck.min.js"></script><!--邮箱-->
<!-- Page Script -->
<script>
    $(function () {
        $('.mailbox-messages input[type="checkbox"]').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
            radioClass: 'iradio_flat-blue'
        });
        $(".checkbox-toggle").click(function () {
            var clicks = $(this).data('clicks');
            if (clicks) {
                //Uncheck all checkboxes
                $(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
                $(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
            } else {
                //Check all checkboxes
                $(".mailbox-messages input[type='checkbox']").iCheck("check");
                $(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
            }
            $(this).data("clicks", !clicks);
        });
        $(".mailbox-star").click(function (e) {
            e.preventDefault();
            //detect type
            var $this = $(this).find("a > i");
            var glyph = $this.hasClass("glyphicon");
            var fa = $this.hasClass("fa");

            //Switch states
            if (glyph) {
                $this.toggleClass("glyphicon-star");
                $this.toggleClass("glyphicon-star-empty");
            }

            if (fa) {
                $this.toggleClass("fa-star");
                $this.toggleClass("fa-star-o");
            }
        });
    });
</script>
</body>
</html>
